The present invention relates generally to distributed file systems, and more particularly, for managing lock resources in distributed file systems.
During the past decade, the demand for scalability of storage systems has sharply increased. To meet this demand many storage systems implement distributed architectures, i.e., distributed storage systems. Generally, multiple processing nodes (e.g., storage servers) that serve data to client applications characterize a distributed storage system. The processing nodes and systems that host the client applications are connected through a network.
Referring to FIG. 1, an exemplary diagram of a distributed storage system 100 is shown. The system 100 comprises of a plurality of independent processing nodes 110 connected to storage devices 120 through a Fiber Channel (FC) connection 130. A storage device 120 may be a tape drive, a disk drive, a redundant array of independent disks (RAID) or similar devices. The processing nodes 110 are further connected to a plurality of clients 140 through a gigabit Ethernet or InfiBand connection 150. The clients 140 may utilize any file sharing protocols, such as network file system (NFS), common internet file system (CIFS), direct access file system (DAFS) or AppleShare to access data stored in storage devices 120. The processing nodes 110 communicate through a network 160, which may be a dedicated network, a wide area network (WAN), a metropolitan area network (MAN) or a local area network (LAN). This allows distributed storage system 100 to aggregate dispersed data centers into a single, unified, storage device. An example of a distributed storage system 100 is disclosed in PCT patent application PCT/US00/34258, entitled “Interconnect Topology for a scalable Distributed Computer System” assigned to common assignee and which is hereby incorporated by reference for all that it discloses.
The operation of the system 100 is managed by a distributed file system, which allows for sharing and storing files in the storage devices 120 or in a cache memory on various levels of storage hierarchy. Additionally, the distributed file system provides a locking mechanism to maintain data consistency of shared files. Specifically, the locking mechanism guarantees that only one client can write to a single file at a time. For example, when a client 140-1 writes to a file “A”, the file is locked to prevent another client 140-2 from manipulating the file “A”. When client 140-1 closes file “A” and client 140-2 attempts to write to that file, the distributed file system then informs client 140-2 that changes were made to the file “A”.
As mentioned above, client 140 can access a file using a plurality of file sharing protocols, each such protocol providing a different mechanism for locking files. For example, the NFS protocol supports share locks and byte range locks, whereas the CIFS protocol supports share locks and byte range locks, as well as the opportunistic locks (Oplocks). A share lock provides exclusive or non-exclusive access permission for an entire file, while the byte range lock provides the same permission for a portion of a file. The Oplock is a non-persistent mechanism that is designed for optimizing local file caching. The Oplock allows a client 140 to notify a processing node 110 that another client (or process) requires access to the file and as result client 140 should flush the cached file back to the server. Generally, an exclusive lock granted to a client 140 does not allow other clients to access the file. A non-exclusive lock granted to a client 140 allows other clients to access the file for reading from or writing to the file. The access rights depend on the lock's mode.
In related art, distributed file mechanisms are disclosed in U.S. Pat. Nos. 5,828,876, 6,009,427 and 6,173,293. However, the disclosed mechanisms do not provide locking services satisfying the locking requirements of all file-sharing protocols. Specifically, the current locking mechanisms do not enable simultaneous operations of different sharing protocols on the same file system resource. Furthermore, the distributed locking mechanisms disclosed in the related are not scalable beyond a certain number of nodes.
Therefore, it would be advantageous to provide a method and a distributed locking system that would resolve the shortcomings introduced in by the prior art.